Otherwise drawing will be clipped.
Testcase included
#include "gtkcssshadowsvalueprivate.h"
+#include <math.h>
+
#include "gtkcairoblurprivate.h"
#include "gtkcssshadowvalueprivate.h"
&radius, &spread);
clip_radius = _gtk_cairo_blur_compute_pixels (radius);
- b.top = MAX (0, clip_radius + spread - voffset);
- b.right = MAX (0, clip_radius + spread + hoffset);
- b.bottom = MAX (0, clip_radius + spread + voffset);
- b.left = MAX (0, clip_radius + spread - hoffset);
+ b.top = MAX (0, ceil (clip_radius + spread - voffset));
+ b.right = MAX (0, ceil (clip_radius + spread + hoffset));
+ b.bottom = MAX (0, ceil (clip_radius + spread + voffset));
+ b.left = MAX (0, ceil (clip_radius + spread - hoffset));
border->top = MAX (border->top, b.top);
border->right = MAX (border->right, b.right);
separator-size.ui \
set-default-direction.ui \
set-default-direction.ref.ui \
+ shadow-clip-rounding.css \
+ shadow-clip-rounding.ref.ui \
+ shadow-clip-rounding.ui \
shorthand-entry-border.css \
shorthand-entry-border.ref.ui \
shorthand-entry-border.ui \
--- /dev/null
+@import "reset-to-defaults.css";
+
+.test {
+ box-shadow: 0 0.99999px red;
+}
+
+.reference {
+ box-shadow: 0 1px red;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.1 -->
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <object class="GtkWindow" id="window1">
+ <property name="width_request">100</property>
+ <property name="height_request">100</property>
+ <property name="can_focus">False</property>
+ <property name="type">popup</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">X</property>
+ <style>
+ <class name="reference"/>
+ </style>
+ </object>
+ </child>
+ </object>
+</interface>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.1 -->
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <object class="GtkWindow" id="window1">
+ <property name="width_request">100</property>
+ <property name="height_request">100</property>
+ <property name="can_focus">False</property>
+ <property name="type">popup</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">X</property>
+ <style>
+ <class name="test"/>
+ </style>
+ </object>
+ </child>
+ </object>
+</interface>